home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / INTERVIE / X11 / PALETTE.H < prev    next >
C/C++ Source or Header  |  1992-03-04  |  626b  |  35 lines

  1. #ifndef palette_h
  2. #define palette_h
  3.  
  4. #include "windows.h"
  5. #include <InterViews\color.h>
  6.  
  7. const int PALETTESIZE = 236;
  8.  
  9. struct LOG_PALETTE {
  10.     WORD palVersion;
  11.     WORD palNumEntries;
  12.     PALETTEENTRY palPalEntry[PALETTESIZE];
  13. };
  14.  
  15. class Palette {
  16. public:
  17.     Palette();
  18.     ~Palette();
  19.  
  20.     void Realize(HDC);
  21.     int  SetEntry(ColorIntensity, ColorIntensity, ColorIntensity);
  22.     int  GetPaletteIndex(DWORD);
  23.     HPALETTE GetPalette()    { return pal; };
  24.  
  25. private:
  26.     friend class Color;
  27.  
  28.     LOG_PALETTE *logPal;
  29.     HPALETTE    pal;
  30.     int         max_entry;
  31. };
  32.  
  33. Palette* _palette;
  34.  
  35. #endif